/*
 * BigBrother.h
 *
 *  Created on: Mar 21, 2012
 *      Author: s146913
 */

#ifndef BIGBROTHER_H_
#define BIGBROTHER_H_

#include "conc/Mutex.h"
#include "conc/Condition.h"
#include "Richting.h"
#include "Auto.h"

class BigBrother {
private:
	Condition* cNoord;
	Condition* cOost;
	Condition* cZuid;
	Condition* cWest;
	Condition* cPasseerd;

	Mutex* mNoord;
	Mutex* mOost;
	Mutex* mZuid;
	Mutex* mWest;

	int wachtendeNoord;
	int wachtendeOost;
	int wachtendeZuid;
	int wachtendeWest;

public:
	BigBrother();
	~BigBrother();

    Condition* getNoord();
    Condition* getOost();
    Condition* getWest();
    Condition* getZuid();
    Condition* getPasseerd();

    Mutex* getMutexNoord();
    Mutex* getMutexOost();
    Mutex* getMutexZuid();
    Mutex* getMutexWest();

	int getWachtendeNoord();
	int getWachtendeOost();
	int getWachtendeZuid();
	int getWachtendeWest();

	void verlaagTeller(Richting deRichting);
	void meldAan(Auto* autootje);
};

#endif /* BIGBROTHER_H_ */
